home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMRD3.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  2KB  |  57 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DEMRD3.PAS
  12.               Illustrates the PromptReal function.
  13. }
  14.  
  15. Program DemRd3;
  16.  
  17. {$I GOLDFLAG.INC}
  18.  
  19. uses DOS,CRT, GoldReal, GoldAttr, GoldMisc,
  20.      GoldFast, GoldRead, GoldIO, GoldWin, GoldStr, GoldKey;
  21.  
  22. var TmpMsg: string;
  23.     TmpNum: extended;
  24.  
  25. procedure SetScreen;
  26. {}
  27. begin
  28.    Clear(WhiteOnCyan,'▒');
  29.    ClearLine(1,WhiteOnBlue);
  30.    WriteCenter(1,UseTInt,' Demo of PromptReal from GOLDREAD ');
  31.    WriteAt(1,2,BlueOnRed,replicate(80,'▀'));
  32.    WriteAT(70,2,WhiteOnBlack,'TTT Gold!');
  33.    ClearLine(25,YellowOnBlue);
  34. end; { SetScreen }
  35.  
  36. begin
  37. {$IFOPT D+}
  38.    HeapRecord;
  39. {$ENDIF}
  40.    SetScreen;
  41.    MouseShow(true);
  42.    TmpNum := PromptReal(0,0,5,'Please enter correct weight',' GoldRead Real Input Demo ',0.0,0.0,1500.0);
  43.    if ReadVars.LastAction = Escaped then
  44.       TmpMsg := 'You pressed Escape!'
  45.    else if TmpNum = 0 then
  46.       TmpMsg := 'You didn''t make an entry'
  47.    else
  48.       TmpMsg := '^You entered '+RealToStr(TmpNum,Floating);
  49.    PromptOK(' PromptReal ',TmpMsg);
  50.    delay(500);
  51.    MouseShow(false);
  52.    Clear(LightGrayOnBlack,' ');
  53. {$IFOPT D+}
  54.    HeapCheck;
  55. {$ENDIF}
  56. end.
  57.